import { createRouter, createWebHistory } from 'vue-router';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: (()=>import('@/views/Home.vue'))
  },
  {
    path: '/coms',
    name: 'coms',
    component: (()=>import('@/views/Coms.vue'))
  },
  // 404 需要放到路由的最后
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: (()=>import('@/views/NotFound.vue')),
  },
  
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
